FROM registry.cn-shenzhen.aliyuncs.com/edana/atlassian-agent:1.3.1

ENV CONFLUENCE_HOME=${ATLASSIAN_HOME}/confluence
ENV JVM_MINIMUM_MEMORY=1024m
ENV JVM_MAXIMUM_MEMORY=2048m
ENV PROXY_ENABLED=false
ENV PROXY_SCHEME=
ENV PROXY_NAME=
ENV PROXY_PORT=

WORKDIR ${ATLASSIAN_INSTALL_DIR}

ADD atlassian-confluence-7.13.1.tar.gz .
RUN mv atlassian-confluence-7.13.1 confluence; \
        mkdir -p "${CONFLUENCE_HOME}"; \
        echo  "\nconfluence.home=${CONFLUENCE_HOME}" >> ${ATLASSIAN_INSTALL_DIR}/confluence/confluence/WEB-INF/classes/confluence-init.properties;

COPY conf conf
COPY confluence-init.sh /docker-entrypoint-init.d

EXPOSE 8090

CMD ["./confluence/bin/start-confluence.sh", "-fg"]
